package com.itheima.atm;

/**
 * 实体类 账户的信息封装
 */
public class Account {
    private String idCard;//卡号
    private String userName;//姓名
    private char sex;// 性别
    private String password;//密码
    private double money;//余额
    private double limit;//取现额度

    public Account() {
    }

    public Account(String idCard, String userName, char sex, String password, double money, double limit) {
        this.idCard = idCard;
        this.userName = userName;
        this.sex = sex;
        this.password = password;
        this.money = money;
        this.limit = limit;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getUserName() {
        return userName + (sex =='男'? "先生" : "女士");
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public double getLimit() {
        return limit;
    }

    public void setLimit(double limit) {
        this.limit = limit;
    }
}
